package com.example.base.net

import com.blankj.utilcode.util.SPUtils
import okhttp3.Interceptor
import okhttp3.Response

/**
 * 自定义请求头拦截器
 */
class TokenIntercepor:Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val request = chain.request().newBuilder()
            .addHeader("Authori-zation", SPUtils.getInstance().getString("token")).build()
        return chain.proceed(request)
    }
}